/*
 * InsertarErrorPantalla.java
 *
 * Created on 25 de septiembre de 2008, 01:53 PM
 */

package GUI;

/**
 *
 * @author  Propietario
 */
public class InsertarErrorPantalla extends javax.swing.JFrame {
    private boolean free;
    private String nTrama;
    /** Creates new form InsertarErrorPantalla */
    public InsertarErrorPantalla(String Trama) {
        free = false;
        initComponents();
        jLMuestraTrama.setText(Trama);
        jTaModificar.setText(Trama);
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        panel1 = new java.awt.Panel();
        jLTOriginal = new javax.swing.JLabel();
        jLMuestraTrama = new javax.swing.JLabel();
        JLMod = new javax.swing.JLabel();
        jTaModificar = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        jBAceptar = new javax.swing.JButton();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenu2 = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setBackground(new java.awt.Color(0, 0, 0));

        panel1.setBackground(new java.awt.Color(0, 0, 0));
        panel1.setForeground(new java.awt.Color(255, 153, 0));

        jLTOriginal.setFont(new java.awt.Font("Arial", 1, 12));
        jLTOriginal.setForeground(new java.awt.Color(255, 153, 0));
        jLTOriginal.setText("Trama Original");

        jLMuestraTrama.setFont(new java.awt.Font("Arial", 1, 12));
        jLMuestraTrama.setForeground(new java.awt.Color(255, 153, 0));

        JLMod.setFont(new java.awt.Font("Tahoma", 1, 12));
        JLMod.setForeground(new java.awt.Color(255, 153, 0));
        JLMod.setText("Campo para Modificar");

        jTaModificar.setFont(new java.awt.Font("Arial", 0, 12));

        jLabel1.setFont(new java.awt.Font("Arial", 1, 18));
        jLabel1.setForeground(new java.awt.Color(255, 153, 0));
        jLabel1.setText("MODIFICAR TRAMA");

        jBAceptar.setBackground(new java.awt.Color(0, 0, 0));
        jBAceptar.setFont(new java.awt.Font("Arial", 1, 12));
        jBAceptar.setForeground(new java.awt.Color(204, 102, 0));
        jBAceptar.setText("Enviar");
        jBAceptar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBAceptarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout panel1Layout = new javax.swing.GroupLayout(panel1);
        panel1.setLayout(panel1Layout);
        panel1Layout.setHorizontalGroup(
            panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panel1Layout.createSequentialGroup()
                        .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLTOriginal, javax.swing.GroupLayout.DEFAULT_SIZE, 152, Short.MAX_VALUE)
                            .addComponent(JLMod, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 152, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLMuestraTrama, javax.swing.GroupLayout.DEFAULT_SIZE, 537, Short.MAX_VALUE)
                            .addComponent(jTaModificar, javax.swing.GroupLayout.PREFERRED_SIZE, 537, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panel1Layout.createSequentialGroup()
                        .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(259, 259, 259))))
            .addGroup(panel1Layout.createSequentialGroup()
                .addGap(252, 252, 252)
                .addComponent(jBAceptar, javax.swing.GroupLayout.PREFERRED_SIZE, 197, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(266, Short.MAX_VALUE))
        );
        panel1Layout.setVerticalGroup(
            panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panel1Layout.createSequentialGroup()
                .addGap(39, 39, 39)
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(33, 33, 33)
                .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLTOriginal, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLMuestraTrama, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(30, 30, 30)
                .addGroup(panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(JLMod)
                    .addComponent(jTaModificar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 95, Short.MAX_VALUE)
                .addComponent(jBAceptar)
                .addGap(53, 53, 53))
        );

        jMenu1.setText("Archivo");
        jMenuBar1.add(jMenu1);

        jMenu2.setText("Acerca de...");
        jMenuBar1.add(jMenu2);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents
    public boolean isFree(){
        return free;
    }
    
    public String getNtrama(){
        return nTrama;
    }
    private void jBAceptarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBAceptarActionPerformed
        // TODO add your handling code here:
        //jTaModificar.getText();
        System.out.println(jTaModificar.getText());
        nTrama = jTaModificar.getText();
        free = true;
    }//GEN-LAST:event_jBAceptarActionPerformed
    /**
     * @param args the command line arguments
     */  
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel JLMod;
    private javax.swing.JButton jBAceptar;
    private javax.swing.JLabel jLMuestraTrama;
    private javax.swing.JLabel jLTOriginal;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JTextField jTaModificar;
    private java.awt.Panel panel1;
    // End of variables declaration//GEN-END:variables
    
}
